#include <stdio.h>
#include <arpa/inet.h> /* inet_aton and inet_ntoa */


int main(int argc, char **argv)
{

	struct in_addr ip;

	char *pointer;
	
	pointer = (char *) &ip;

	pointer = pointer + 2;

	inet_aton("192.168.0.255",&ip);

	//printf("Ip: %s\n",inet_ntoa(ip));

	//printf("IP Hex :%#X\n",ip);
	
	//printf("Pointer hex: %#X\n", (char ) *pointer);

	//printf("Address of ip : %p - Address of pointer : %p\n",&ip, pointer);

	/* Modification the ip */
	int i;
	printf("Ip: %s\n",inet_ntoa(ip));
	for (i=1; i<255; i++){
		*pointer = *pointer + 0x01;
		printf("Ip: %s\n",inet_ntoa(ip));
	}

	return 0;

}
